home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6455 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: admaix.sunydutchess.edu!ub!newserve!rebecca!rpi!not-for-mail
  2. From: ENGR@GSSI.mv.com (Michael Furman)
  3. Newsgroups: comp.lang.c++,comp.lang.c++.moderated
  4. Subject: Re: Q: stack corrupted before main()?
  5. Date: 8 Feb 1996 14:55:00 -0000
  6. Organization: GSSI
  7. Sender: cppmods@netlab.cs.rpi.edu
  8. Approved: kanze@lts.sel.alcatel.de
  9. Message-ID: <4fd2s4$7t3@netlab.cs.rpi.edu>
  10. References: <4f8423$kp9@netlab.cs.rpi.edu>
  11. NNTP-Posting-Host: netlab.cs.rpi.edu
  12. X-Original-Date: Thu, 8 Feb 1996 14:23:38 GMT
  13.  
  14. In article <4f8423$kp9@netlab.cs.rpi.edu>, jaceks@stud.unit.no says...
  15. >
  16. >The project I am currently working on is exhibiting the following behavior: 
  17. the
  18. >stack is corrupted even before control enters main(). That is, when I run it
  19. >under a debugger and view the stack, it shows names of non-existent 
  20. functions
  21. >..... snip .....
  22. >I am quite confident that the stack is corrupted before any code (or rather 
  23. MY
  24. >code) is exectued. I do not, for example, have any global instances of 
  25. classes,
  26. >whose constructors would be executed before main().
  27.  
  28. I would say it may be one of the following:
  29.  
  30. 1. You program contains global/static instance of class with constructor
  31.    (in spite of you don't believe it). And it corrupts stack.
  32. 2. Something inconsistent in your project files (corrupted .obj file(s), 
  33.    too low stack size, e.t.c).
  34. 3. Broken compiler/library.
  35.  
  36. I would suggest:
  37.  - check (2) by checking all project parameters (turn on all diagnostics,
  38.    like checking stack overflow e.t.c) and rebilding all staff.
  39.  - check (1). If there is no lack - switch debugger into ASM mode
  40.    (use another debugger if the one you are using can't) ang go through
  41.    sturtup code.
  42.  
  43.  
  44.  
  45. - -- 
  46. <<<<<<<< This is a copy of post to the newsgroup >>>>>>>>
  47. - ---------------------------------------------------------------
  48. Michael Furman,                       (603)893-1109
  49. Geophysical Survey Systems, Inc.  fax:(603)889-3984
  50. 13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
  51. North Salem, NH 03073-0097            71543.1334@compuserve.com
  52. - ---------------------------------------------------------------
  53.  
  54.  
  55.       [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
  56.       [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
  57.       [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
  58.       [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]
  59.